Sensing motor current

ABSTRACT

A circuit for sensing the driving current of a motor, the circuit comprising: a driver configured to generate a driving current for each phase of a multiple-phase motor, the instantaneous sum of all the driving currents being zero; a current sensor for each phase of the multiple-phase motor, each current sensor configured to measure the driving current of that phase and comprising a plurality of current sensor elements arranged with respect to each other such that each current sensor element has the same magnitude of driving current systematic error due to magnetic fields external to the driving current to be measured; and a controller configured to, for each phase of the multiple-phase motor, generate an estimate of the driving current of that phase to be the measured driving current of that phase minus 1/n of the total of the measured driving currents for all phases, n being the number of phases of the multiple-phase motor.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.17/195,717 filed Mar. 9, 2021, which is a continuation of U.S. patentapplication Ser. No. 16/465,650 filed May 31, 2019 [now U.S. Pat. No.10,976,353], which is a U.S. National Phase Application under 35 U.S.C.§ 371 of International Application No. PCT/GB2017/053641, filed Dec. 1,2017 [Expired], which claims priority to United Kingdom Application No.1620524.7, filed Dec. 2, 2016. Each application referenced above ishereby incorporated by reference in its entirety for all purposes.

BACKGROUND

In systems which are controlled by a motor, it is desirable toaccurately sense the current that is being driven through the motor.Typically, the current along with several other parameters is monitoredand input to a feedback control loop which refines the operation of themotor. For example, in a DC motor, the current, shaft position, speedand direction of the rotating motor may all be measured, and thosemeasurements input to a motor control circuit, which forms controlinputs to the driver to adjust the operation of the motor.

A current sense resistor can be used to measure the driving current of amotor. A shunt resistor is placed in the motor drive line such that itreceives the driving current prior to the motor. The voltage drop acrossthe resistor is measured, for example by a differential amplifier,thereby yielding the driving current. Current sense resistors areresistant to thermal changes in their surroundings and to externalelectromagnetic fields.

However, power is dissipated in a shunt resistor, thus the current senseresistor is an intrusive current sensing mechanism: the current outputfrom the current sense resistor to the motor is lower than that input toit. The power dissipated in the shunt resistor increases quadraticallyas the resistance increases. At the high currents typically used todrive motors, the waste heat generated by a current sense resistor canexceed the temperature threshold to which the motor and/or surroundingcircuitry can safely be exposed. Additionally, the motor and surroundingcircuitry is typically subject to a power limit, which is exceeded bythe current sense resistor at high currents.

To satisfy the power limit and reduce the intrusiveness of the sensor,the resistor can be reduced in size. However, the output signal of thecurrent sense resistor increases linearly with resistance, so byreducing the resistance, the sensitivity of the current sense resistoris reduced. Very small currents cause a very small voltage drop, whichmay be undetectable over the background noise level. Thus, current senseresistors having low resistance have output signals with low signal tonoise ratios. Smaller resistors are more inaccurate, which leads to anincreased error in the output signal. Additionally, motors are typicallydriven with high frequency current. At low resistance, the impedance ofa resistor is dominated by inductance rather than resistance. Thus, thedriving current cannot be derived as straightforwardly as describedabove.

An alternative sensor to a current sense resistor is a Hall sensor. AHall sensor is a magnetic current sensor which is activated by anexternal magnetic field acting on it. It is thus able to provide anon-intrusive measurement of the current being driven through a motor bydetecting the magnetic field generated by the current flow. The Hallsensor produces an output voltage which varies as a function of themagnetic field density around it. Hence, by measuring the output voltageof a Hall sensor located in close proximity to the path of the driveroutput, the driving current of the motor is determined. None of themeasured driving current is dissipated by the Hall sensor. Hall sensorsthus do not suffer from the waste heat and power problems of currentsense resistors.

Large Hall sensors are available which are insensitive to changes intheir thermal surroundings and external electromagnetic fields. However,these are not suitable for small, lightweight applications. In suchapplications, it is desirable for the footprint of the current sensor tobe as small as possible, and the weight of the current sensor to beminimised. Small Hall sensors are available which can be packaged into asmall IC. However, these Hall sensors suffer from the problem that theiroperation is very sensitive to their thermal surroundings and toexternal electromagnetic fields, for example those from magnets in themotor. As a motor is driven, the circuit boards on which the motor andthe Hall sensor are located increase in temperature to levels outside ofthe narrow temperature window at which the Hall sensor provides anaccurate current measurement.

There is thus a need to provide a non-intrusive current sensor foraccurately measuring the driving current of a motor which is suitablefor small, lightweight applications.

SUMMARY OF THE INVENTION

According to an aspect of the invention, there is provided a circuit forsensing the driving current of a motor, the circuit comprising: a driverconfigured to generate a driving current for each phase of amultiple-phase motor, the instantaneous sum of all the driving currentsbeing zero; a current sensor for each phase of the multiple-phase motor,each current sensor configured to measure the driving current of thatphase; and a controller configured to, for each phase of themultiple-phase motor, generate an estimate of the driving current ofthat phase to be the measured driving current of that phase minus 1/n ofthe total of the measured driving currents for all phases, n being thenumber of phases of the multiple-phase motor.

The driver may be configured to generate a succeeding driving current ofeach phase of the multiple-phase motor in response to a control input,the control input comprising the estimate of the driving current of eachphase.

The controller may be configured to generate an estimate of the error ofeach measured driving current to be equal to 1/n of the total of themeasured driving currents for all phases.

The multiple-phase motor may have three phases.

Each current sensor may comprise a plurality of current sensor elements,each current sensor element configured to measure the driving current ofthe phase thereby generating a driving current reading, the measureddriving current of that phase being a combination of the driving currentreadings of the current sensor elements.

The plurality of current sensor elements of each current sensor may bearranged with respect to each other such that each current sensorelement has the same magnitude of driving current systematic error dueto magnetic fields external to the driving current to be measured.

The plurality of current sensor elements of each current sensor maycomprise two current sensor elements arranged in an opposingorientation.

The controller may be configured to calculate the measured drivingcurrent of that phase to be half the sum of the driving current readingsof the two current sensor elements.

The plurality of current sensor elements of each current sensor maycomprise two current elements arranged in the same orientation and wiredin series in opposition.

The controller may be configured to calculate the measured drivingcurrent of the phase to be half the difference of the driving currentreadings of the two current sensor elements.

The plurality of current sensor elements of each current sensor maycomprise two current elements arranged in an opposing orientation andwired in parallel.

The controller may be configured to calculate the measured drivingcurrent of the phase to be the sum of the driving current readings ofthe two current sensor elements.

Each current sensor element may be a Hall sensor configured to output aHall voltage, the driving current reading being a function of the Hallvoltage.

The circuit may further comprise a temperature sensor configured tomeasure the circuit temperature, and output a measured circuittemperature to the controller.

The controller may be configured to: receive a first calibrationtemperature measurement from the temperature sensor and a firstcalibration Hall voltage from a current sensor element of a phase of themultiple-phase motor, both measurements taken concurrently duringcircuit disconnection; receive a second calibration temperaturemeasurement from the temperature sensor and a second calibration Hallvoltage from the said current sensor element, both measurements takenconcurrently during circuit connection; and derive a thermal calibrationprofile of the Hall voltage of the said current sensor element from thereceived calibration measurements.

The controller may be configured to calibrate the measured drivingcurrent of a phase prior to generating an estimate of the drivingcurrent of that phase.

The thermal calibration profile may be linear, and the controller may beconfigured to calibrate the measured driving current of a phase bydeducting a linear offset from each driving current reading of thecurrent sensor elements of that phase in accordance with the thermalcalibration profiles of those current sensor elements.

The controller may be configured to receive the first calibrationtemperature measurement and the first calibration Hall voltage whichwere taken during circuit disconnection at start-up.

The controller may be configured to receive the first calibrationtemperature measurement and the first calibration Hall voltage whichwere taken during a period of motor disconnection during use.

The controller may be configured to receive the second calibrationtemperature measurement and the second calibration Hall voltage whichwere taken during circuit connection when the driving current of thatphase was momentarily driven to zero by the driver following a period ofhigher driving current of that phase.

The circuit may further comprise a magnetic shield which encompasses allthe current sensors.

The magnetic shield may comprise two shield layers arranged on eitherside of the current sensors.

The magnetic shield may comprise a further shield element locatedbetween the motor and the current sensors.

The magnetic shield may be composed of Mu-metal.

BRIEF DESCRIPTION OF THE FIGURES

The present invention will now be described by way of example withreference to the accompanying drawings. In the drawings:

FIG. 1 illustrates a motor control circuit;

FIG. 2 illustrates a three-phase motor in a wye winding arrangement;

FIG. 3 is a plot illustrating the relationship between Hall voltage andtemperature; and

FIGS. 4, 5 and 6 illustrate arrangements of differential Hall sensorelements.

DETAILED DESCRIPTION

The current being driven through a motor depends on the particularapplication. For example, it depends on the components that the motor isconfigured to drive. In many applications, the driving current variessignificantly in magnitude, and may be very high. For example, thecurrent may be up to 50 A. The driving current may also have a largefrequency bandwidth, and may have a very high frequency. For example,the bandwidth may be ^(˜)50 kHz. Thus, the circuitry used to sense thecurrent is usefully sensitive over a large frequency bandwidth and ableto accurately detect high currents. In addition, the circuitry usefullyhas a small footprint and is able to generate a current measurement in anon-intrusive manner. Hall sensors are able to measure high magnitudeand high frequency currents in a non-intrusive way over a smallfootprint. Hall sensors generate a real-time current measurement. As thedriving current changes, the magnetic field it generates changes, andhence the voltage output by the Hall sensor changes. Thus, the currentmeasurement derived from the Hall sensor updates at the frequency of thedriving current. This current measurement has a high signal to noiseratio, thus is subject to little filtering. It is therefore accurate athigh bandwidths as well as low bandwidths. Thus, the Hall sensor isaccurate for measuring high and low speed current signals.

However, as discussed above, Hall sensors have poor thermal stability.This leads to large systematic errors in their current measurements astheir ambient temperature deviates from the small temperature windowover which their performance is stable. They are also very sensitive toexternal electromagnetic fields. Fields arising from nearby circuitry,such as from magnets in the motor, and even the earth's magnetic fieldare picked up by the Hall sensor along with the field from the drivingcurrent, causing errors in the current measurement.

The following describes circuitry of a motor control circuit which isused to mitigate the thermal and/or electromagnetic sensitivity of asmall Hall sensor (i.e. one that can be integrated onto an IC), therebyenabling the Hall sensor to be used to accurately measure the drivingcurrent of a motor.

FIG. 1 illustrates an exemplary motor control circuit 100. Driver 102drives motor 104 under the control of controller 106. The depicted motor104 is a multiple-phase motor having n motor phases 108, where n is apositive number. For example, the motor may be a brush less DC motor.The motor may be a three-phase motor, for example in a wye or deltawinding arrangement. The motor may have greater than or fewer than threemotor phases. In FIG. 1 , each motor phase is driven separately by arespective driving element 110 of driver 102. Thus, there are n motordrive lines from the driver 102 to the motor 104, one for each of the nmotor phases 108. The motor 104 has n motor output lines 112, one foreach of the n motor phases 108.

The motor control circuit further comprises n current sensors 114, onein each motor drive line between the driver and the motor. The drivingcurrent output by each driving element 110 is measured by one of thecurrent sensors 114 before it is input to its respective motor phase108. Suitably, each current sensor 114 is a Hall sensor. Each currentsensor outputs its driving current measure to the controller 106. Thecontroller 106 outputs a control input 116 to the driver 102 independence on the measurements received from the current sensors 114.The driver generates the driving currents for the respective motorphases in dependence on control signal 116. The driver may drive themotor drive lines independently. In this case, the control signal 116comprises a control input for each driving element 110. Thus, thedriving current for a specific motor phase is produced by a drivingelement in dependence on the sensed driving current for that motor phaseonly. Alternatively, the driver may drive the motor drive lines independence on the sensed driving currents for a plurality or all of thesensed driving currents. In this case, the control signal 116 maycomprise only one control input for all of the driving elements 110.

The driver may select the current to drive the motor in dependence onother sensed parameters in addition to the current. For example, one ormore of the shaft position, speed, torque and direction of the rotatingmotor may also be measured, and those measurements fed back to thecontroller 106 to generate control signals to send to the driver toadjust the operation of the motor.

The driver may select the current to drive the motor in dependence oninputs other than those sensed and received in a feedback loop. Forexample, external inputs to change one or more of the direction, speedor torque of the motor may be received by the controller 106. Thecontroller then generates control signals in dependence on these inputsto send to the driver to adjust the operation of the motor.

In an exemplary implementation, the multiple-phase motor is arrangedsuch that, at any point in time, the sum of the driving currents of thenmotor phases is zero:Σ_(i=1) ^(i=n) I _(i)=0  (equation 1)where I is the current.

FIG. 2 illustrates a three-phase motor in a wye winding arrangement. Allthree windings 202, 204, 206 are connected. In FIG. 2 :I ₁ +I ₂ +I ₃=0  (equation 2)

The driving current measurement taken by each Hall sensor 114 is subjectto an error due to the thermal and electromagnetic sensitivities of theHall sensor described above.I _(i) ^(m) =I _(i) +e _(i) ^(m)  (equation 3)where I^(m) is the measured current, and e^(m) is the error.

As a result of the errors, the sum of the measured driving currents ofall the sensors is not zero.Σ_(i=1) ^(i=n) I _(i) ^(m)≠0  (equation 4)

Instead, the sum of the measured driving currents of all the sensors is:I ^(SUM)=Σ_(i=1) ^(i=n) I _(i) ^(m)=Σ_(i=1) ^(i=n) I _(i)+Σ_(i=1) ^(i=n)e _(i) ^(m)  (equation 5)Thus,I ^(SUM)=Σ_(i=1) ^(i=n) I _(i) ^(m)=Σ_(i=1) ^(i=n) e _(i)^(m)  (equation 6)

In the example of FIG. 2 , the sum of the measured driving currents ofall the sensors, I^(SUM), is:I ^(SUM) =I ₁ +e ₁ ^(m) +I ₂ +e ₂ ^(m) +I ₃ +e ₃ ^(m)  (equation 7)Thus,I ^(SUM) =e ₁ ^(m) +e ₂ ^(m) +e ₃ ^(m)  (equation 8)

Each Hall sensor can be considered to be subject to the same error.Thus,e ₁ ^(m) =e ₂ ^(m) = . . . e _(n) ^(m)  (equation 9)

In a motor control circuit integrated onto an IC, the Hall sensors 114are within close proximity of each other. For example, they may beseparated by <^(˜)6 mm. Suitably, the Hall sensors 114 are oriented inthe same direction with respect to the circuit board on which they aremounted. Thus, the external electromagnetic field experienced by eachHall sensor is substantially the same. Thus, the approximation that theHall sensors are subject to the same error is reasonable.

Thus, the error of each measured driving current can be considered tobe:

$\begin{matrix}{e_{i}^{m} = \frac{I^{SUM}}{n}} & \left( {{equation}10} \right)\end{matrix}$

For the example of FIG. 2 :

$\begin{matrix}{e_{1}^{m} = {e_{2}^{m} = {e_{3}^{m} = \frac{I^{SUM}}{3}}}} & \left( {{equation}11} \right)\end{matrix}$

The driving current of each motor phase can thus be estimated as:

$\begin{matrix}{I_{i}^{EST} = {I_{i}^{m} - \frac{I^{SUM}}{n}}} & \left( {{equation}12} \right)\end{matrix}$where I_(n) ^(EST) is the estimated driving current of the nth motorphase.

In the example of FIG. 2 :

$\begin{matrix}{{I_{1}^{EST} = {I_{1}^{m} - \frac{I^{SUM}}{3}}}{I_{2}^{EST} = {I_{2}^{m} - \frac{I^{SUM}}{3}}}{I_{3}^{EST} = {I_{3}^{m} - \frac{I^{SUM}}{3}}}} & \left( {{equation}s13} \right)\end{matrix}$

The controller 106 receives the measured driving currents I₁ ^(m), I₂^(m) . . . I_(n) ^(m) of then motor phases from the n Hall sensors 114.Error corrector 126 of controller 106 generates an estimated drivingcurrent I₁ ^(EST), I₂ ^(EST) . . . I_(n) ^(EST) for each of the n motorphases. The error corrector 126 may additionally generate an estimate ofthe error e₁ ^(m), e₂ ^(m) . . . e_(n) ^(m) of each of the measureddriving currents. The controller outputs a control signal 116 to thedriver 102. This control signal comprises the estimated driving currentfor each of the n motor phases. The driver generates the driving currentof each motor phase in response to the control signal. For example, ifthe estimated driving current of a motor phase is below a desired value,then the driver 102 may respond by increasing the current input to thatphase of the motor. Similarly, if the estimated driving current is abovea desired value, then the driver 102 may respond by decreasing thecurrent input to that phase of the motor.

As described above, Hall sensors are sensitive to their thermalsurroundings. The output voltage of the Hall sensor is subject to atemperature offset. The offset changes with the ambient temperature ofthe Hall sensor. The ambient temperature of the Hall sensor is generallythe operating temperature of the circuit board on which the motor isbeing driven. The temperature range of the circuit board depends on theapplication. The temperature of the circuit board may vary from −40° C.to 125° C. The temperature of the circuit board may vary from 15° C. to60° C. The drift of the Hall sensor output voltage with temperature overthe operational temperature range of the circuit board can beapproximated to be a linear relationship, as shown in FIG. 3 . FIG. 3 isa graph in which the Hall voltage measured by a Hall sensor is plottedagainst temperature for the same motor driving current. As shown on FIG.3 , the Hall voltage increases linearly with temperature when subject tothe same magnetic field density.

The driving current measured by each Hall sensor 114 is a function ofthe Hall voltage of that Hall sensor. Suitably, each Hall sensor outputsits Hall voltage to the controller 106. The controller 106 thencalibrates the Hall voltage of each Hall sensor according to a thermalcalibration profile so as to correct the Hall voltage reading forthermal drift. The controller then determines an estimate of the drivingcurrent of the motor phase sensed by that Hall sensor utilising thethermally calibrated Hall voltage reading.

The motor control circuit may comprise a temperature sensor 118.Temperature sensor 118 measures the circuit temperature, and outputs 120the measured circuit temperature to the controller 106. The temperaturesensor 118 may continually or periodically measure the temperature andoutput it to the controller 106. Alternatively, the temperature sensor118 may measure and output the circuit temperature in response to acontrol signal 122 from the controller 106.

The controller performs a calibration in order to derive the thermalcalibration profile of the Hall sensor. Two pairs of calibrationmeasurements (marked A and B on FIG. 3 ) are taken and output to thecontroller. Each pair of calibration measurements comprises atemperature measurement taken by the temperature sensor 118 and a Hallvoltage from the Hall sensor 114. The temperature and Hall voltage aremeasured concurrently by their respective sensors. The Hall sensor 114may take and output the Hall voltage in response to receiving a controlinput 124 from the controller 106. The temperature sensor 118 may takeand output the temperature measurement in response to receiving acontrol input 122 from the controller 106.

The driving current of the motor phase is the same during both pairs ofcalibration measurements. For example, the driving current of the motorphase may be zero during both pairs of calibration measurements. Thetemperature that the Hall sensor is exposed to is greater duringcalibration pair B than calibration pair A. The first pair ofcalibration measurements A may be taken during a period of circuitdisconnection. During this period, the driving current of the motorphase is zero. For example, the first pair of calibration measurements Amay be taken during circuit start-up prior to operation of the circuit.At this time, the circuit board temperature is the same as thetemperature of the circuit board's surroundings (i.e. room temperature).Alternatively, the first pair of calibration measurements A may be takenduring a short disconnection of the motor whilst the motor is inoperation. The inductive time constant of the motor is very short, thusthe heat energy generated by the motor quickly dissipates and thetemperature of the circuit board returns to the temperature of thecircuit board's surroundings. Thus, after a motor disconnection of ^(˜)1μs, the first pair of calibration measurements A may be taken.

The second pair of calibration measurements B are taken concurrentlyduring a time of circuit connection when the circuit board has increasedin temperature as a result of the motor circuit being in operation. Thedriving current of the motor phase is the same during the second pair ofcalibration measurements B as it was during the first pair ofcalibration measurements A. Thus, if the driving current of the motorphase was zero during the first pair of calibration measurements A, thenthe driving current of the motor phase is also zero during the secondpair of calibration measurements B. In order to take the second pair ofcalibration measurements B, the controller may output a control signalto the driver to cause the driving current of that motor phase tomomentarily be zero. Prior to this time, the driving current of themotor phase was higher. The controller receives a Hall voltage readingfrom the Hall sensor and a temperature measurement from the temperaturesensor which were taken concurrently whilst the driving current of thatmotor phase was zero. The controller may send a control signal to boththe Hall sensor and the temperature sensor to stimulate them to take andoutput the second pair of calibration measurements B.

Calibrator 128 of controller 106 receives the two pairs of calibrationmeasurements A and B. The calibrator derives a thermal calibrationprofile of the Hall voltage of the Hall sensor from the calibrationmeasurements A and B. The relationship between the Hall voltage andtemperature is assumed to be linear, as shown by line 300 on FIG. 3 . Inreality, the relationship between the Hall voltage and temperature willdeviate from a precisely linear relationship. However, in thetemperature range to which the Hall sensor is likely to be exposed in amotor circuit, a linear relationship is a good approximation. Thus, thethermal calibration profile is linear. Since the driving current of themotor phase that the Hall sensor was detecting was the same atcalibration measurements A and B, the Hall voltage reading, oncecorrected for thermal drift, should be the same. The Hall sensor isaccurate at the temperature of measurement A, but not at the highertemperature of measurement B. Thus, line 302 on FIG. 3 illustrates theHall voltage which would have been measured across the temperature rangehad it not been subject to thermal drift. Line 302 intersects the Hallvoltage calibration measurement A. Since it is known that Hall voltagemeasurement B should have been the same as Hall voltage measurement A,the linear offset between Hall voltage measurement B and Hall voltagemeasurement A is known. This linear offset is depicted by 304 on FIG. 3. From this, a thermal calibration function is derived for that Hallsensor. The thermal calibration function is a temperature dependentlinear offset.

During subsequent operation, the temperature sensor 118 takes regulartemperature measurements, which it outputs to the controller. Thecalibrator receives the Hall voltage measured by the Hall sensor. Ituses the most recently received temperature measurement to determine thelinear offset. It then calibrates the Hall voltage reading for thermaldrift by deducting the linear offset from the Hall voltage reading.Having done this, the controller may then apply the further errorcorrection methods described herein so as to generate an estimate of thedriving current of the motor phase.

Suitably, the controller performs the calibration individually for eachHall sensor in the motor control circuit, thereby deriving a thermalcalibration profile for each Hall sensor. The controller then calibrateseach Hall sensor output voltage using the thermal calibration profile ofthat Hall sensor. In an alternative approach, the controller may performthe calibration on just one Hall sensor in the motor control circuit,and then calibrate the Hall voltage from each Hall sensor in the motorcontrol circuit using the thermal calibration profile of the calibratedHall sensor. Alternatively, the controller may derive an average thermalcalibration profile for all the Hall sensors in the motor controlcircuit by receiving calibration temperature measurements from each ofthe Hall sensors and averaging them. The controller then calibrates theHall voltage of each Hall sensor using the average thermal calibrationprofile. The latter two approaches minimise the storage space and powerrequired to perform the thermal calibration for the motor controlcircuit.

Each Hall sensor 114 may comprise a single Hall sensor element.Alternatively, each Hall sensor 114 may comprise a plurality of Hallsensor elements. Each of the plurality of Hall sensor elements of a Hallsensor 114 independently measures the driving current of the motor phaseto form a driving current reading. The driving current measured by theHall sensor 114 is a combination of the driving current readings of theindividual Hall sensor elements of that Hall sensor. The Hall sensor maycomprise any number of Hall sensor elements. Suitably, the number ofHall sensor elements is chosen to be a number of harmonics that themotor control circuit is not sensitive to.

In the following examples, the Hall sensor consists of two Hall sensorelements. Two Hall sensor elements can be mounted on the same plane asthe motor drive line whose current they are measuring. The two Hallsensor elements form a differential pair of Hall sensors. The two Hallsensor elements are arranged with respect to each other such that eachHall sensor element has the same magnitude of systematic error in theHall voltage due to magnetic fields external to the driving currentbeing measured. This is achieved by the relative positions of the Hallsensor elements and/or the manner in which they are each wired. Thedriving current readings of the two Hall sensor elements are combined soas to eliminate this systematic error, such that the resultant drivingcurrent measurement of the Hall sensor 114 as a whole is not subject tothis systematic error.

FIGS. 4, 5 and 6 illustrate example arrangements of two Hall sensorelements of a Hall sensor 114. The + and − graphics indicate theorientation of the sensor. Sensors marked + and + are in the sameorientation. Sensors marked + and − are in opposing orientations.

In FIG. 4 , the Hall sensor elements are arranged back to back on thecircuit board. Both Hall sensor elements 402 and 404 measure positivecurrent, I. However, the Hall sensor elements are in opposingorientations. Thus, the systematic error due to external magnetic fieldsmeasured by Hall sensor element 402 is opposite to the systematic errordue to external magnetic fields measured by Hall sensor element 404. Thecurrent measurement from Hall sensor element 402 is:I ^(m1) =I+e _(m) +e′  (equation 14)where I^(m) is the measured current, I is the true current, and e_(m) isthe error due to external magnetic fields, and e′ is other sources oferror (such as error due to thermal drift).

The current measurement from Hall sensor element 404 is:I ^(m2) =I−e _(m) +e′  (equation 15)

On receiving these current measurement readings from these Hall sensorelements, the controller determines the current measurement of the Hallsensor as a whole by adding the current measurement readings togetherand then halving the result:

$\begin{matrix}{I^{m} = \frac{I^{m1} + I^{m2}}{2}} & \left( {{equation}16} \right)\end{matrix}$ $\begin{matrix}{I^{m} = {I + e^{\prime}}} & \left( {{equation}17} \right)\end{matrix}$

The error due to external magnetic fields e_(m) is thereby eliminatedfrom the current measurement of the Hall sensor, I^(m).

In FIG. 5 , the Hall sensor elements are arranged side by side on thecircuit board. The Hall sensor elements are wired in series. The Hallsensor elements are wired in opposite directions such that one Hallsensor element 502 measures positive current, I, and the other Hallsensor element 504 measures negative current, −I. Both the Hall sensorelements are oriented in the same direction. Thus, the systematic errordue to external magnetic fields measured by both Hall sensor elements isthe same. The current measurement from Hall sensor element 502 is:I ^(m1) =I+e _(m) +e′  (equation 18)where I^(m) is the measured current, I is the true current, and e_(m) isthe error due to external magnetic fields, and e′ is other sources oferror (such as error due to thermal drift). The current measurement fromHall sensor element 504 is:I ^(m2) =−I+e _(m) +e′  (equation 19)

On receiving these current measurement readings from these Hall sensorelements, the controller determines the current measurement of the Hallsensor as a whole by calculating the difference between the currentmeasurement readings and then halving the result:

$\begin{matrix}{I^{m} = \frac{I^{m1} - I^{m2}}{2}} & \left( {{equation}20} \right)\end{matrix}$ $\begin{matrix}{I^{m} = {I + e^{\prime}}} & \left( {{equation}21} \right)\end{matrix}$

The error due to external magnetic fields e_(m) is thereby eliminatedfrom the current measurement of the Hall sensor, I^(m).

In FIG. 6 , the Hall sensor elements are arranged side by side on thecircuit board. The Hall sensor elements are wired in parallel. Both Hallsensor elements 602 and 604 measure positive current, I/2. The Hallsensor elements are in opposing orientations. Thus, the systematic errordue to external magnetic fields measured by Hall sensor element 602 isopposite to the systematic error due to external magnetic fieldsmeasured by Hall sensor element 604. The current measurement from Hallsensor element 602 is:

$\begin{matrix}{I^{m1} = {\frac{1}{2} + \frac{e_{m}}{2} + \frac{e^{\prime}}{2}}} & \left( {{equation}22} \right)\end{matrix}$

where I^(m) is the measured current, I is the true current, and e_(m) isthe error due to external magnetic fields, and e′ is other sources oferror (such as error due to thermal drift).

The current measurement from Hall sensor element 604 is:

$\begin{matrix}{I^{m2} = {\frac{1}{2} - \frac{e_{m}}{2} + \frac{e^{\prime}}{2}}} & \left( {{equation}23} \right)\end{matrix}$

On receiving these current measurement readings from these Hall sensorelements, the controller determines the current measurement of the Hallsensor as a whole by adding the current measurement readings together:I ^(m) =I ^(m1) +I ^(m2)  (equation 24)I ^(m) =I+e′  (equation 25)

The error due to external magnetic fields e_(m) is thereby eliminatedfrom the current measurement of the Hall sensor, I^(m).

The Hall sensor elements may interfere with each other. The currentflowing through the wire in one Hall sensor element creates a magneticfield that can interfere with the measurement made by the other Hallsensor element. The sensor arrangement of FIG. 4 has a greatersusceptibility to this interference than the arrangements of FIGS. 5 and6 . However, the error due to external magnetic fields, e_(m), is bettermatched for the sensor element pair on FIG. 4 than the sensor elementpairs of FIGS. 5 and 6 . The error in one Hall sensor element'smeasurement due to the magnetic field of the other Hall sensor elementhas been determined to be approximately 4%. The controller 106 may beconfigured to correct the Hall voltages it receives from the Hall sensorelements for this error.

In an exemplary implementation, each Hall sensor element of a Hallsensor is calibrated individually for its temperature dependence usingthe method described herein.

The Hall sensors may be magnetically shielded in order to reduce theerror in the Hall sensor measurements caused by external magneticfields. This shielding may act to uniformly distribute external magneticfields over the Hall sensors. Thus, each Hall sensor experiences thesame interference from the external magnetic fields. The shield may be asingle layer on the opposing side to the Hall sensors than the circuitboard on which the Hall sensors are mounted. The layer may be parallelto the circuit board. The shield may be two layers, one on either sideof the circuit board on which the Hall sensors are mounted. These twolayers may be parallel to the circuit board. The shield may comprise afurther shield element located between the Hall sensors 114 and themotor 104.

The shield may be composed of Mu-metal. Mu-metal has a high magneticpermeability which draws magnetic field lines to it rather than theregion it protects. The Mu-metal shield is therefore itself a source ofmagnetic interference for the Hall sensors. Thus, the Mu-metal shield islocated sufficiently far away from the Hall sensors so as not tointerfere with their current measurements. Additionally, the Mu-metalshield saturates. Thus, the Mu-metal shield is sized sufficiently largeto absorb the external fields that the motor control circuit is expectedto be subject to before saturation.

Any one or more of the above described circuitry for mitigating thethermal and/or electromagnetic sensitivity of Hall sensors may be usedin combination in the motor control circuit.

The motor control circuit 100 is suitably incorporated within acomputing-based device. The computing-based device may be an electronicdevice. Suitably, the computing-based device comprises one or moreprocessors for processing computer executable instructions to controloperation of the device in order to implement the methods describedherein. The computer executable instructions can be provided using anycomputer-readable media such as a memory. The methods described hereinmay be performed by software in machine readable form on a tangiblestorage medium. Software can be provided at the computing-based deviceto implement the methods described herein. For example, the errorcorrector of the controller may comprise error correcting logic tocorrect the current sensor readings received from the Hall sensors. Thecalibrator of the controller may comprise calibrating logic to performthe calibration described herein.

The motor 104 being controlled by the motor control circuit 100 may beused to drive movement of a joint which connects limbs of a robot. Forexample, the motor may be used to drive a joint in a surgical robot arm.It is desirable to make surgical robot arms as compact as possible. Themotor for driving the actuation of a joint of a surgical robot arm ispreferably located proximal to the joint. Thus, the motor controlcircuit 100, including the current sensors 114, are preferably as smallas possible. Surgical robots are subject to maximum power limits andalso to temperature limits. Utilising the circuitry and methodsdescribed herein enables a small Hall sensor to provide an accurate,temperature stable and non-intrusive current measurement and is hencesuitable for incorporation into a motor control circuit of a surgicalrobot.

The applicant hereby discloses in isolation each individual featuredescribed herein and any combination of two or more such features, tothe extent that such features or combinations are capable of beingcarried out based on the present specification as a whole in the lightof the common general knowledge of a person skilled in the art,irrespective of whether such features or combinations of features solveany problems disclosed herein, and without limitation to the scope ofthe claims. The applicant indicates that aspects of the presentinvention may consist of any such individual feature or combination offeatures. In view of the foregoing description it will be evident to aperson skilled in the art that various modifications may be made withinthe scope of the invention.

The invention claimed is:
 1. A circuit for mitigating thermalsensitivity in a motor wherein a phase of the motor receives a drivingcurrent, the circuit comprising: a current sensor configured to measurethe driving current for the phase of the motor, wherein the currentsensor comprises a Hall sensor configured to output a Hall voltage, themeasured driving current being a function of the Hall voltage; thecontroller configured to: receive a first calibration temperaturemeasurement from a temperature sensor configured to measure the circuittemperature and a first calibration Hall voltage from the currentsensor, both measurements taken concurrently during circuitdisconnection; receive a second calibration temperature measurement fromthe temperature sensor and a second calibration Hall voltage from thecurrent sensor, both measurements taken concurrently during circuitconnection; and derive a thermal calibration profile of the Hall voltageof the current sensor from the received calibration measurements.
 2. Thecircuit as claimed in claim 1, further comprising a driver configured togenerate the driving current for the phase of the motor.
 3. The circuitas claimed in claim 2, wherein the driver is configured to generate asucceeding driving current of the phase of the motor in response to acontrol input, the control input comprising an estimate of the drivingcurrent of the phase.
 4. The circuit as claimed in claim 1, wherein themotor is a multiple-phase motor and the circuit comprises a currentsensor for each phase of the multiple-phase motor, wherein thecontroller is further configured to, for each phase of themultiple-phase motor, generate an estimate of the driving current ofthat phase to be the measured driving current of that phase minus 1/n ofthe total of the measured driving currents for all phases, n being thenumber of phases of the multiple-phase motor.
 5. The circuit as claimedin claim 1, wherein the motor is a multiple-phase motor and the circuitcomprises a current sensor for each phase of the multiple-phase motor,wherein the controller is configured to generate an estimate of theerror of each measured driving current to be equal to 1/n of the totalof the measured driving currents for all phases, n being the number ofphases of the multiple-phase motor.
 6. The circuit as claimed in claim1, wherein the current sensor comprises a plurality of current sensorelements, each current sensor element configured to measure the drivingcurrent of the phase thereby generating a driving current reading, themeasured driving current of the phase being a combination of the drivingcurrent readings of the current sensor elements.
 7. The circuit asclaimed in claim 6, wherein the plurality of current sensor elements ofthe current sensor are arranged with respect to each other such thateach current sensor element has the same magnitude of driving currentsystematic error due to magnetic fields external to the driving currentto be measured.
 8. The circuit as claimed in claim 7, wherein theplurality of current sensor elements of the current sensor comprises twocurrent sensor elements arranged in an opposing orientation.
 9. Thecircuit as claimed in claim 8, wherein the controller is configured tocalculate the measured driving current of the phase to be half the sumof the driving current readings of the two current sensor elements. 10.The circuit as claimed in claim 7, wherein the plurality of currentsensor elements of the current sensor comprises two current elementsarranged in the same orientation and wired in series in opposition,wherein the controller is configured to calculate the measured drivingcurrent of the phase to be half the difference of the driving currentreadings of the two current sensor elements.
 11. The circuit as claimedin claim 7, wherein the plurality of current sensor elements of thecurrent sensor comprises two current elements arranged in an opposingorientation and wired in parallel, wherein the controller is configuredto calculate the measured driving current of the phase to be the sum ofthe driving current readings of the two current sensor elements.
 12. Thecircuit as claimed in claim 1, wherein the controller is configured togenerate an estimate of a driving current of the phase and calibrate themeasured driving current of the phase prior to generating the estimateof the driving current.
 13. The circuit as claimed in claim 12, whereinthe thermal calibration profile is linear, and the controller isconfigured to calibrate the measured driving current of the phase bydeducting a linear offset from each driving current reading of thecurrent sensor of the phase in accordance with the thermal calibrationprofiles of the current sensor.
 14. The circuit as claimed in claim 1,wherein the controller is configured to receive the first calibrationtemperature measurement and the first calibration Hall voltage whichwere taken during circuit disconnection at start-up.
 15. The circuit asclaimed in claim 1, wherein the controller is configured to receive thefirst calibration temperature measurement and the first calibration Hallvoltage which were taken during a period of motor disconnection duringuse.
 16. The circuit as claimed in claim 1, wherein the controller isconfigured to receive the second calibration temperature measurement andthe second calibration Hall voltage which were taken during circuitconnection when the driving current of the phase was momentarily drivento zero by the driver following a period of higher driving current ofthe phase.
 17. The circuit as claimed in claim 1, wherein the controlleris configured to calibrate the Hall voltage from the current sensorusing the thermal calibration profile of the calibrated current sensor.18. The circuit as claimed in claim 1, further comprising a magneticshield which encompasses the current sensor.
 19. The circuit as claimedin claim 1, further comprising a temperature sensor configured tomeasure the circuit temperature, and output a measured circuittemperature to the controller.
 20. The circuit as claimed in claim 1,wherein the motor is a multiple-phase motor, and the circuit comprises acurrent sensor for each phase of the multiple-phase motor, each currentsensor configured to measure the driving current of that phase.